from typing import Iterator, Type
from ctools.common import get_subclasses
from .ctbase import CToolsCmd

# for get_subcmd_classes
from .cflow     import CFlowCmd
from .ctree     import CTreeCmd
from .cview     import CViewCmd
from .elf_layout import ElfLayoutCmd
from .syscalls  import SyscallCmd

def get_subcmd_classes() -> Iterator[Type[CToolsCmd]]:
    clss = get_subclasses(CToolsCmd, level=-1)
    return (cls for cls in clss if cls.can_work())
